import { province, city, area, prodtree } from '@/services/basic';


export default {
	"productName": {
		"value": null,
		"type": "input",
		"title": "产品名称",
		"name": [
			"productName"
		],
		"required": true
	},
	"productCategoryId": {
		"value": null,
		"type": "treeselect",
		"title": "类别",
		"name": [
			"productCategoryId"
		],
		"required": true,
		"options": {
			"database": prodtree,
			"params": {}
		}
	},
	"seoKeywordOne": {
		"value": null,
		"type": "input",
		"title": "关键词一",
		"name": [
			"seoKeywordOne"
		],
		"required": true
	},
	"seoKeywordTow": {
		"value": null,
		"type": "input",
		"title": "关键词二",
		"name": [
			"seoKeywordTow"
		],
		"required": false
	},
	"seoKeywordThree": {
		"value": null,
		"type": "input",
		"title": "关键词三",
		"name": [
			"seoKeywordThree"
		],
		"required": false
	},
	"seoKeywordFour": {
		"value": null,
		"type": "input",
		"title": "关键词四",
		"name": [
			"seoKeywordFour"
		],
		"required": false
	},
	"seoKeywordFive": {
		"value": null,
		"type": "input",
		"title": "关键词五",
		"name": [
			"seoKeywordFive"
		],
		"required": false
	},
	"productImageUrlList": {
		"value": null,
		"type": "upload",
		"title": "产品图片",
		"name": [
			"productImageUrlList"
		],
		"required": true,
		"listType": "img",
		"multiple": true,
		"limit": 5
	},
	"priceList": {
		"value": null,
		"type": "table",
		"title": "产品价格",
		"name": [
			"priceList"
		],
		"required": true,
		"maxLength": 5,
		"columns": [
			{
				"title": "起订量(≥)",
				"dataIndex": "fromOrderQuantity",
				"key": "fromOrderQuantity",
				"valueType": "digit",
				"formItemProps": {
					rules: [
						{
							required: true,

							message: '此项是必填项',
						}
					]
				}
			},
			{
				"title": "是否面议",
				"dataIndex": "isDiscuss",
				"key": "isDiscuss",
				"formItemProps": {
					rules: [
						{
							required: true,
							message: '此项是必填项',
						}
					]
				},
				"valueType": "radio",
				"width": 130,
				// "valueEnum": {
				// 	1: {
				// 		text: '是',
				// 		status: 'Error',
				// 	},
				// 	0: {
				// 		text: '否',
				// 		status: 'Success',
				// 	},
				// },
				"request": ()=>[
					{
						"label": "是",
						"value": 1
					},
					{
						"label": "否",
						"value": 0
					}
				]
			},
			{
				"title": "单价",
				"dataIndex": "unitPrice",
				"key": "unitPrice",
				"valueType": "money",
				"formItemProps": {
					rules: [
						{
							required: true,
							message: '此项是必填项',
						}
					]
				}
			},
			{
				title: '操作',
				valueType: 'option',
				render: () => {
					return null;
				},
			},
		],
		"editable": true,
		"dataSource": [],
		"rowKey": "id",
		"rowName": "",
	},
	"paramList": {
		"value": null,
		"type": "table",
		"title": "产品参数",
		"name": [
			"paramList"
		],
		"required": true,
		"maxLength": 5,
		"columns": [
			{
				"title": "参数名",
				"dataIndex": "paramName",
				"key": "paramName",
				"valueType": "input"
			},
			{
				"title": "参数值",
				"dataIndex": "paramValue",
				"key": "paramValue",
				"valueType": "input"
			},
			{
				title: '操作',
				valueType: 'option',
				render: () => {
					return null;
				},
			},
		],
		"editable": true,
		"dataSource": [],
		"rowKey": "id",
		"rowName": "",
	},
	"productNum": {
		"value": null,
		"type": "inputnumber",
		"title": "供货量",
		"name": [
			"productNum"
		],
		"required": true
	},
	"unitName": {
		"value": null,
		"type": "input",
		"title": "供货量单位",
		"name": [
			"unitName"
		],
		"required": true
	},
	"isCashSale": {
		"value": null,
		"type": "radio",
		"title": "是否现货",
		"name": [
			"isCashSale"
		],
		"required": true,
		"options": [
			{
				"label": "是",
				"value": 1
			},
			{
				"label": "否",
				"value": 0
			}
		]
	},
	"productDesc": {
		"value": null,
		"type": "textarea",
		"title": "产品描述",
		"name": [
			"productDesc"
		],
		"required": true,
		"col": {
			"span": 24
		}
	},
	"provinceId": {
		"value": null,
		"type": "select",
		"title": "产地-省",
		"name": [
			"provinceId"
		],
		"required": true,
		"linked": true,
		"options": {
			"database": province,
			"params": {}
		}
	},
	"cityId": {
		"value": null,
		"type": "select",
		"title": "产地-市",
		"name": [
			"cityId"
		],
		"required": true,
		"linked": true,
		"belinked": {
			"options": {
				"database": city,
				"params": {
					"provinceId": "linked"
				}
			}
		}
	},
	"productBrandName": {
		"value": null,
		"type": "input",
		"title": "品牌",
		"name": [
			"productBrandName"
		],
		"required": false
	},
	"deliveryWithinDays": {
		"value": null,
		"type": "inputnumber",
		"title": "发货期(多少天内发货)",
		"name": [
			"deliveryWithinDays"
		],
		"required": false
	},
	"productAttachUrlList": {
		"value": null,
		"type": "upload",
		"title": "附件",
		"name": [
			"productAttachUrlList"
		],
		"required": false,
		"listType": "file",
		"multiple": true,
		"limit": 5
	}
}